コンテナ内のEggplant DAIのデプロイ
Eggplant DAIは、Helmを使用してKubernetesにインストールできます。以下の要件を満たす必要があります: You will need to meet the following requirements: You will need to meet the following requirements: 以下の要件を満たす必要があります:
要件 | Notes |
---|---|
Kubernetesクラスタ | テストバージョン1.24。 |
ingress-nginx | テストバージョン1.3.0 (chartバージョン4.2.1). |
Keda v2 | オプション、オートスケーリングエンジン用。 テストバージョン2.7。 |
Eggplant DAIライセンス | 必要に応じてサポートに問い合わせてください。 |
これらの要件を満たしたら、Helmの値ファイルを作成することで、デフォルトのEggplant DAIデプロイをインストールできます。 以下の例では、独自のデプロイ用にすべての値を置き換えます。
global:
postgresql:
auth:
postgresPassword: postgres
ingress:
host: dai.example.com
keycloak:
host: dai.example.com
devLicense: a-real-license-goes-here
execLicense: a-real-license-goes-here
objectStorage:
minio:
rootUser: "eggplant"
rootPassword: "eggplant"
keycloak:
externalDatabase:
# This must match the value of global.postgresql.auth.postgresPassword
password: postgres
keycloak-user-provisioner:
adminUsers:
daiAdmin:
username: admin-username
email: admin-email
password: admin-password
いくつかの注意点:
global.ingress.host
とglobal.keycloak.host
は同じドメインである必要はありませんが、解決可能である必要があります。 これは、クラスタにExternalDNSをデプロイするか、手動でレコードを作成してクラスタを指すことで行うことができます。keycloak-user-provisioner.adminUsers.daiAdmin.password
は12文字以上である必要があります。keycloak-user-provisioner.adminUsers
の下に追加のキーを追加することで、追加の管理ユーザーを追加することができます。
すべての値の詳細なドキュメントはこちらで見ることができます。
次に、Kubernetesクラスタにそれをデプロイします:
$ helm upgrade --install \ --namespace dai \ --create-namespace \ dai \ dai \ --repo oci://harbor.dai.eggplant.cloud/charts/dai \ --version 1.8.6 \ --values dai.yaml \ --wait Release "dai" does not exist. Installing it now. NAME: dai LAST DEPLOYED: Fri Feb 17 08:20:17 2023 NAMESPACE: dai STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Thank you for installing dai.
Your release is named dai.
To learn more about the release, try:
$ helm status dai $ helm get all dai
You can access your DAI instance by visiting dai.example.com.
admin username: admin-username admin password: admin-password
このインストールでは、Bitnami Helmチャートを使用して、必要なサードパーティの依存関係が自動的にインストールおよび設定されます。これらの依存関係は: These dependencies are: These dependencies are: これらの依存関係は以下の通りです:
依存関係 | テストされたチャートバージョン | テストされたアプリバージョン |
---|---|---|
RabbitMQ | 11.13.0 | 3.11.13 |
PostgreSQL | 11.9.13 | 14.7.0 |
MinIO | 12.2.6 | 2022.2.5 |
Keycloak | 10.1.6 | 19.0.3 |
Helmチャートはこれらの依存関係をインストールしますが、PostgreSQLまたはMinIOに格納されているデータのバックアップは管理しません。 ディザスタリカバリ計画の一部として、これらのサービスのバックアップを整理する必要があります。 There's an example of one approach to backups later in this documentation.
サポートされるカスタマイゼーション
デフォルトのインストールでは、PostgreSQLとMinIOのデータが永続ボリュームに保存され、すべての依存関係がKubernetesにデプロイされます。 PostgreSQLまたはAWS S3と互換性のあるオブジェクトストレージの既存のソリューションがあり、それを代わりに使用したい場合は、Eggplant DAIのインストールをカスタマイズして使用することができます。 さらに、valuesファイルの中ではなく、Kubernetesのシークレットを使用して認証情報を渡すことができます。
このドキュメントのセクションでは、インストールをカスタマイズする方法を示す例を示しています。 すべての例では、認証情報にシークレットを使用します。 すべての例は、上記で示したデフォルトのインストール値に追加することを意味するスニペットです。
オブジェクトストレージの設定
Eggplant DAIは、テストスクリーンショットなどのアセットを永続的に保持す るために、S3互換のオブジェクトストレージソリューションに依存しています。 Helmチャートはこれを設定するいくつかのオプションを提供しています。
バンドルされたMinIO(デフォルト)
デフォルトでは、Eggplant DAI Helmチャートはランダムなroot-userとroot-passwordでMinIOをサブチャートとしてデプロイします。
You can override these random values by providing an existing secret. First, prepare an existing secret with credentials in:
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: dai-objectstorage
stringData:
root-user: username
root-password: password
$ kubectl -n dai apply -f dai-objectstorage.yaml
次に、既存のシークレットを指すように値ファイルを更新し、Helmアップグレードを実行します:
global:
objectStorage:
minio:
existingSecret: dai-objectstorage
minio:
auth:
existingSecret: dai-objectstorage
$ helm upgrade dai oci://harbor.dai.eggplant.cloud/charts/dai --version 1.8.6 -f dai.yaml --wait
注意:global.objectStorage.minio.existingSecret
と minio.auth.existingSecret
は一致する必要があります。
PostgreSQLのインストールはBitnamiチャートによって提供されています。postgresql
キーの下でvaluesファイルにオプションを渡すことで、さらにカスタマイズすることができます。利用可能なオプションについては、Bitnamiのドキュメントを参照 してください。
You can further customise it by passing options to it under the postgresql
key in your values file. See the Bitnami documentation for available options.
Eggplantは、MinIOの設定の変更をサポートしていません。
既存のMinIO
既存のMinIOインストールがある場合、上記で作成した同じシークレットを使用して、次のように使用できます:
global:
objectStorage:
minio:
existingSecret: dai-objectstorage
endpoint: my.minio.deployment.example.com
minio:
enabled: false
注: minio
キーを使用して enabled
を false
に設定します。これにより、バン ドルされたMinIOのデプロイが防止されます。 This prevents the bundled MinIO from being deployed. This prevents the bundled MinIO from being deployed.
DAIインストールの外部のMinIOインストールに対して、Eggplantはサポートを提供できません。
S3
AWS S3は、次のように既存のシークレットを使用してオブジェクトストレージに設定できます。まず、次の資格情報で既存のシークレットを準備します: First, prepare an existing secret with credentials in: First, prepare an existing secret with credentials in: まず、以下に認証情報を含む既存のシークレットを用意してください:
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: dai-objectstorage
stringData:
aws-access-key-id: my-access-key-id
aws-secret-access-key: my-secret-access-key
$ kubectl -n dai apply -f dai-objectstorage.yaml
次に、次のキーを更新または追加して値ファイルを変更します:
global:
objectStorage:
provider: "aws"
aws:
existingSecret: dai-objectstorage
awsAccessKeyIdKey: aws-access-key-id
awsSecretAccessKeyKey: aws-secret-access-key
region: "eu-west-1"
minio:
enabled: false
次に、クラスタにHelmを使用してデプロイできます。